﻿@model PublishNews.Models.UserModel

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="col-md-6">
    <h2>Create User</h2>

    @if (Model.Succeeded)
    {
        <label>Thank you for you register</label>
    }
    else
    {

        using (Html.BeginForm())
        {
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true)

        <fieldset>
            <div class="form-group">
                @Html.LabelFor(model => model.FullName)
                @Html.TextBoxFor(model => model.FullName, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.FullName)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.PhoneNumber)
                @Html.TextBoxFor(model => model.PhoneNumber, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.PhoneNumber)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Fax)
                @Html.TextBoxFor(model => model.Fax, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Fax)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.IsAdministrator)
                @Html.CheckBoxFor(model => model.IsAdministrator)
                @Html.ValidationMessageFor(model => model.IsAdministrator)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.HideEmail)
                @Html.CheckBoxFor(model => model.HideEmail)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.RejectNews)
                @Html.CheckBoxFor(model => model.RejectNews)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.UserName)
                @Html.TextBoxFor(model => model.UserName, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.UserName)
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Password)
                @Html.PasswordFor(model => model.Password, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Password)
            </div>

            <p>
                <input class="btn btn-primary" type="submit" value="Create" />
            </p>
        </fieldset>
        }
    }

    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
</div>
